import service from '@/utils/request'

// 新增教学计划
export const addPlanService = (planName) => {
  return service.post('/plan', null, {
    params: {
      planName: planName
    }
  });
};

// 添加教学计划内容
export const addPlanContentsService = (contents, planId) => {
  return service({
    url: '/plan/addContents',
    method: 'post',
    data: contents,
    params: {
      planId: planId
    },
    headers: {
      'Content-Type': 'application/json'
    }
  });
};

// 将计划与课程绑定
export const updatePlanService = (classId, planId) => {
  return service.post('/plan/updatePlan', null, {
    params: {
      classId: classId,
      planId: planId
    }
  });
};

// 查询教学计划
export const getPlanService = (classId) => {
  return service.get('/plan', {
    params: {
      classId: classId
    }
  });
}; 